<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/9/26
  Time: 13:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>file upload</title>
    <script src="./js/jquery-3.2.1.min.js"></script>
    <script>
        function fn() {
            $.ajax({
                url:"/test",
                type:"POST",
                success:function (datas) {
                    alert(datas.name);
                },
                dataType:"json"
            });
        }
    </script>
</head>
<body>
<form action="upload.action" enctype="multipart/form-data" method="post">
    student photo <input type="file" name="file"><br>
    submit <input type="submit" value="submit">
</form>
<p>多文件上传</p>
<form action="up.action" enctype="multipart/form-data" method="post">
    学生的姓名：<input type="text" name="name" ><br>
    student photo <input type="file" name="file" multiple><br>
    submit <input type="submit" value="submit">
</form>
<%
    out.print(4);
%>
${455565}
<input type="button" value="ajax访问服务器" onclick="fn()">
</body>
</html>
